#ifndef UI_COLORS_H
#define UI_COLORS_H

#include <QtCore/QVariant>
#include <QtGui/QApplication>
#include <QtGui/QDockWidget>
#include <QtGui/QWidget>
#include <QtGui/QGridLayout>
#include <QtGui/QLabel>

#include "DockWidget/DockWidgetTools/colorview.h"

QT_BEGIN_NAMESPACE

class Ui_Colors
{
public:
    QGridLayout* layoutColors;

    ColorView* viewColor;

    QWidget* widgetRGB;//(0,1) dans le layoutColors
    QGridLayout* layoutRGB;//dans la widgetRGB
    QLabel* labelTitreRGB;
    QLabel* labelR;
    QLabel* labelG;
    QLabel* labelB;
    QLabel* labelCodeR;
    QLabel* labelCodeG;
    QLabel* labelCodeB;

    QWidget* widgetYUV;//(1,1) dans le layoutColors
    QGridLayout* layoutYUV;//dans la widgetYUV
    QLabel* labelTitreYUV;
    QLabel* labelY;
    QLabel* labelU;
    QLabel* labelV;
    QLabel* labelCodeY;
    QLabel* labelCodeU;
    QLabel* labelCodeV;


    void setupUi(QWidget *DockColorsClass)
    {
        //Creation of the main grid
        layoutColors = new QGridLayout(DockColorsClass);

        //Creation of the window containing the Colorview
        viewColor = new ColorView();

        //Creation of the window containing the gridlayoutRGB
        widgetRGB = new QWidget();
        //Creation of the main gridlayout contained in the widgetRGB
        layoutRGB = new QGridLayout(widgetRGB);
        //Creation of the all labels in this layoutRGB
        labelTitreRGB = new QLabel();
        labelR = new QLabel();
        labelG = new QLabel();
        labelB = new QLabel();
        labelCodeR = new QLabel();
        labelCodeG = new QLabel();
        labelCodeB = new QLabel();

        //Creation of the window containing the gridlayoutYUV
        widgetYUV = new QWidget();
        //Creation of the main gridlayout contained in the widgeYUV
        layoutYUV = new QGridLayout(widgetYUV);
       //Creation of the all labels in this layoutYUV
        labelTitreYUV = new QLabel();
        labelY = new QLabel();
        labelU = new QLabel();
        labelV = new QLabel();
        labelCodeY = new QLabel();
        labelCodeU = new QLabel();
        labelCodeV = new QLabel();


        // disposition of all objects
        layoutColors->addWidget(viewColor, 0, 0, 1, 1, Qt::AlignTop);
        layoutColors->addWidget(widgetRGB, 0, 1, 1, 1, Qt::AlignTop);
        layoutColors->addWidget(widgetYUV, 1, 1, 1, 1, Qt::AlignTop);


        layoutRGB->addWidget(labelTitreRGB,0,0,1,2,Qt::AlignTop | Qt::AlignHCenter);
        layoutRGB->addWidget(labelR,1,0,1,1,Qt::AlignTop);
        layoutRGB->addWidget(labelG,2,0,1,1,Qt::AlignTop);
        layoutRGB->addWidget(labelB,3,0,1,1,Qt::AlignTop);
        layoutRGB->addWidget(labelCodeR,1,1,1,1,Qt::AlignTop);
        layoutRGB->addWidget(labelCodeG,2,1,1,1,Qt::AlignTop);
        layoutRGB->addWidget(labelCodeB,3,1,1,1,Qt::AlignTop);

        layoutYUV->addWidget(labelTitreYUV,0,0,1,2,Qt::AlignTop | Qt::AlignHCenter);
        layoutYUV->addWidget(labelY,1,0,1,1,Qt::AlignTop);
        layoutYUV->addWidget(labelU,2,0,1,1,Qt::AlignTop);
        layoutYUV->addWidget(labelV,3,0,1,1,Qt::AlignTop);
        layoutYUV->addWidget(labelCodeY,1,1,1,1,Qt::AlignTop);
        layoutYUV->addWidget(labelCodeU,2,1,1,1,Qt::AlignTop);
        layoutYUV->addWidget(labelCodeV,3,1,1,1,Qt::AlignTop);

        QMetaObject::connectSlotsByName(DockColorsClass);

        labelTitreRGB->setText(QString::fromUtf8("RGB"));
        labelR->setText(QString::fromUtf8("R"));
        labelG->setText(QString::fromUtf8("G"));
        labelB->setText(QString::fromUtf8("B"));

        labelTitreYUV->setText(QString::fromUtf8("YUV"));
        labelY->setText(QString::fromUtf8("Y"));
        labelU->setText(QString::fromUtf8("U"));
        labelV->setText(QString::fromUtf8("V"));


    }


};

namespace UiColors {
    class ColorsClass: public Ui_Colors {};
} // namespace Ui

QT_END_NAMESPACE


#endif // UI_COLORS_H
